package com.jxj.daoImpl;

import java.util.List;

import javax.annotation.Resource;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.stereotype.Repository;

@Repository
public class ReciveDaoImpl {
 @Resource
 private SessionFactory sessionFactory;
 public Session getSession(){
	 return this.sessionFactory.getCurrentSession();
 }
 	public List findDemand(int udid){
 		String hql="from Demand where udid=?";
 		return this.getSession().createQuery(hql).setParameter(0, udid).list();
 		
 	}
 	public List reciveDemand(int urid){
 		String hql="from Recive where urid=?";
 		return this.getSession().createQuery(hql).setParameter(0, urid).list();
 	}
 
	
}
